package com.cisite.web.core



import java.io.Serializable;


/**
 * description: 内容表
 *
 * @author 展醉
 * @2012-6-3 上午11:20:31
 */
class Content implements Serializable{
  int typeId;
  Date sortDate;
  /**固顶级别*/
  int topLevel;
  /**是否有标题图*/
  boolean isTitleImg = false;
  /**是否推荐*/
  boolean hasRecommend = false;
  boolean isCheck = false;
  int status;
  /**日访问数*/
  int viewDays;
  int commentDays;
  int downloadDays;
  /**日顶数*/
  int upsDays;
  String title;
  String shortTile;
  String author;
  String originUrl;
  String description;
  Date releaseDate;
  String titleColor;
  boolean isBold = false;
  int typeImg;
  /**指定模版*/
  String tplCont;
  /**需要重新生成静态页面*/
  boolean needRegenerate = false;
  
  static belongsTo = [manager:Manager,channel:Channel]
  static constraints = {
	  title(size:2..50,Blank:false)
	  shortTile(size:2..20,Blank:false)
	  
	  typeId(nullable:true)
	  sortDate(nullable:true)
	  topLevel(nullable:true)
	  isTitleImg(nullable:true)
	
	  hasRecommend(matches:/\d{1,2}/,nullable:true)
	  isCheck(nullable:true)
	  status(nullable:true)
	  viewDays(nullable:true)
	  commentDays(nullable:true)
	  downloadDays(nullable:true)
	  upsDays(nullable:true)
	  title(nullable:true)
	  shortTile(nullable:true)
	  author(nullable:true)
	  originUrl(nullable:true)
	  description(nullable:true)
	  releaseDate(nullable:true)
	  titleColor(nullable:true)
	  isBold(nullable:true)
	  typeImg(nullable:true)
	  tplCont(nullable:true)
	  needRegenerate(nullable:true)
  }
  static mapping = {
	  version false
	  cache true
  }
 }
